<template>
  <div
    id="userLayout"
    v-if="isReload"
  >
    <div class="login_logo">
      <div>
        <img
          :src="logoSrc"
          class="logos"
        >
      </div>
    </div>
    <div class="login_panle">
      <div class="login_panle_left">
        <sign-left />
      </div>
      <login-form
        @onSubmit="onSubmit"
        :logging="logging"
        ref="loginForm"
        v-if="!pwdModifyFlag"
      >
      </login-form>
      <div class="login_panle_foot">
        <span>{{ copyright }}</span>
        <p>{{ copyrightEn }}</p>
      </div>
    </div>
  </div>
</template>

<script>
import logo from "@/assets/logo30.jpg";
import SignLeft from "./SignLeft.vue";
import LoginForm from "./LoginForm.vue";
import logoImg from "@/assets/logo-long-fnd.png";

export default {
  name: "LoginPage",
  components: { SignLeft, LoginForm },
  data() {
    return {
      copyright: "版权所有©上海菲耐得信息科技有限公司",
      copyrightEn: "CopyRight©FNDSoft Co., Ltd.. All Rights Reserve",
      logo,
      logoSrc: logoImg,
      logging: false,
      isReload: true,
      pwdModifyFlag: false,
    };
  },
  methods: {
    onSubmit(data) {
      console.log("onSubmit-data:", data);
      this.$router.push('/')
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.ant-form-item-control {
  line-height: 70px !important;
}
#userLayout {
  margin: 0;
  padding: 0;
  background-image: url("@/assets/bg.png");
  background-size: cover;
  width: 100%;
  height: 100%;
  position: fixed;
  .login_logo {
    display: flex;
    align-items: center;
    margin-top: 0;
    width: 100%;
    position: fixed;
    top: 20px;
    left: 30px;
    padding: 6px 28px;
    .logos {
      width: 200px;
      height: 50px;
    }
  }
  .login_panle {
    position: absolute;
    top: 3vh;
    left: 1vw;
    width: 90vw;
    height: 94vh;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    .login_panle_left {
      width: 915px;
      height: 420px;
      float: right !important;
    }
    .login_panle_foot {
      position: fixed;
      bottom: 0;
      text-align: center;
      font-size: 14px;
      color: #434343 !important;
    }
  }
  .reset-password {
    font-size: 1.375rem;
    line-height: 2.25rem;
    margin: auto;
    font-weight: 500;
  }
}

//小屏幕不显示右侧，将登陆框居中
@media (max-width: 750px) {
  .login_panle_right {
    display: none;
  }
  .login_panle {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
  }
  .login_panle_form {
    width: 100%;
  }
}
</style>
